import requests
import torch


try:
    response = requests.get("https://hf-mirror.com", timeout=10)
    print(f"镜像网站连接成功，状态码: {response.status_code}")
except Exception as e:
    print(f"镜像网站连接失败: {e}")

# 在初始化时检查CUDA可用性
if torch.cuda.is_available():
    device_count = torch.cuda.device_count()
    print(f"Available GPUs: {device_count}")
